import { IsDiyReg } from '@/rules/is-diyReg.rule'
import { IsEmail, IsEnum, IsNotEmpty, IsNumberString, Length, Validate, MaxLength, IsOptional } from 'class-validator'
import { ISConfirmed } from 'src/rules/is-confirmed.rule'
import { IsNotExistsRule } from 'src/rules/is-not-exists.rule'
enum gender {
  '男',
  '女',
  '未知',
}
export class updateUserDto {
  @IsOptional()
  @IsDiyReg(/[\u4e00-\u9fa5_a-zA-Z0-9_]{2,15}/, { message: '昵称只能为2~15的中文或数字,字母' })
  nickName: string

  @IsOptional()
  @MaxLength(40, { message: 'url过长，需要小于40位' })
  avatar_url: string

  @IsOptional()
  @IsDiyReg(/[\u4e00-\u9fa5_a-zA-Z0-9_]{0,20}/, { message: '签名只能为0~20的中文或数字,字母' })
  autograph: string

  @IsOptional()
  @IsEnum(gender, { message: '性别只能为男/女/未知' })
  gender: string
}
